package com.woniuxy.rabbitmq83.topic;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * description: TopicProductor <br>
 * date: 2022/1/12 5:31 下午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */
@Component
public class TopicProductor {
    @Resource
    private AmqpTemplate amqpTemplate;

    public void send(String message) {
        amqpTemplate.convertAndSend("topicExchange", "chengdu.news", message);
    }
}
